<?PHP
require_once WACT_ROOT.'controller/controller.inc.php';
require_once WACT_ROOT.'controller/form.inc.php';
require_once WACT_ROOT. 'util/dataspace.inc.php';
require_once APP_ROOT.'view/common/layout.view.php';

require_once APP_ROOT.'model/common/user.php';
require_once APP_ROOT.'model/common/categories.php';
require_once APP_ROOT.'model/common/session.php';
require_once APP_ROOT.'model/common/page.php';
require_once 'model/common/date.php';
require_once APP_ROOT . "model/common/site.php";


class InterviewView extends LayoutView {
	function InterviewView ($TemplateFile){
		parent::LayoutView($TemplateFile);

	}

	function prepare(&$controller, &$request, &$responseModel){
		parent::prepare();
		if(!Session::isLogin())
			$this->Template->set('login',' ');

		$docbase="http://".$_SERVER['HTTP_HOST'];
		$this->Template->set('docbase',$docbase);

		if(APP_NAME!=""){
			$this->Template->set('app_name',APP_NAME);
		} else $this->Template->set('app_name','.');

  
        
		$this->Template->set('SITE_CSS',Site::getSiteTemplateCSS());
		$this->Template->set('SITE_BASE',Site::getSiteTemplateBase());
		$this->Template->set('SITE_TITLE',Site::getTitle());
		$this->Template->set('title',Site::getTitle().' - Interviews');


		//load filters

		$pager=& $this->Template->getChild('pagenav');

		$list=Page::getInterviewsList($pager);
		$this->Template->setChildDataSource('pages',$list);




	}
}

class InterviewPage extends PageController {
	function InterviewPage() {
		parent::PageController();
 
        $mytemplate1 = 'pub/pages/interviews.html';
        
		$this->setDefaultView(new InterviewView($mytemplate1));


	}

}
?>
